home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / CALib & You… / Source / CASample / CAS_Globals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-07  |  2.8 KB  |  128 lines  |  [TEXT/MPS ]

  1. /*
  2.  
  3.     File:        CAS_Globals.h
  4.  
  5.     Contains:    theDoc variables declarations, defines, and typedefs.
  6.  
  7.     Written by:    David H Nelson
  8.  
  9.     Copyright © 1993-1995 ComponentWorks, All rights reserved.
  10.  
  11.     Change History (most recent first):
  12.  
  13.          <2>     4/23/95    RB        Added gAppMenuBar
  14.          <1>     11/20/93    DHN        Created.
  15.  
  16. */
  17.  
  18. #if !defined(_H_CAS_Globals)
  19. #define _H_CAS_Globals
  20.  
  21. #include <Drag.h>
  22. #include "CAS_Misc.h"
  23. #include "CAS_App.h"
  24.  
  25.  
  26. #include "TraceLog.h"
  27.  
  28. //#if defined(__MIXEDMODE__) || !defined(THINK_C)
  29. //#include <Printing.h>
  30. //#endif
  31.  
  32. #undef GLOBAL
  33. #ifdef _MAIN_
  34. #define GLOBAL
  35. #else
  36. #define GLOBAL extern
  37. #endif
  38.  
  39.  
  40. //----------------------------------------------------------------------
  41. #define kWindowID            128
  42.  
  43. // Dialog Resource ID's
  44. #define kSaveChangesDialog    129
  45. #define kGetInfoDialog        131
  46. #define kPreferencesDialog    132
  47. #define kErrorDialog        133
  48. #define kPrintStatusDialog    135
  49.  
  50. #define handCursor            128
  51.  
  52. #define kOKButton        1
  53. #define kCancelButton    2
  54.  
  55. #define kSaveButton        1
  56. #define kDontSaveButton    3
  57.  
  58. #define SBARWIDTH            16
  59.  
  60. // Miscellaneous String Resources
  61.  
  62. #define kStrings            1000
  63.  
  64. typedef enum
  65. {
  66.     itOurPrefName = 1,
  67.     itClosing,
  68.     itQuitting,
  69.     itSavePrompt,
  70.     itUntitled
  71. }
  72. StrIndexes;
  73.  
  74. //---------------------------------------------------------------------------
  75. //    Constants
  76.  
  77. #define    kPICTType    'PICT'
  78.  
  79.  
  80. //---------------------------------------------------------------------------
  81.  
  82. // These are the globals for the application.
  83.  
  84. GLOBAL Boolean            gExitFlag;
  85. GLOBAL Boolean            gInBackground;
  86. GLOBAL Boolean            gOptionPressed;
  87. GLOBAL Boolean            gShiftPressed;
  88. GLOBAL Boolean            gCmdPressed;
  89. GLOBAL Boolean            gControlPressed;
  90. GLOBAL long                gMouseUpTickCount;
  91. GLOBAL Point            gMouseUpPoint;
  92.  
  93. GLOBAL unsigned long    gSleepTime;            // current sleep value for WaitNextEvent 
  94. GLOBAL RgnHandle        gMouseRgn;            // current mouse-moved rgn for WaitNextEvent 
  95.  
  96. GLOBAL short            gPrefRefNum;        // refnum of pref res file
  97. GLOBAL Boolean            gPrefChanged;        // true when a pref value changes
  98. GLOBAL Boolean            gPrefSampleFlag;    // a sample pref flag to save
  99.  
  100. GLOBAL unsigned long    gWindowCount;        // Count of new windows for naming new untitled windows. 
  101.  
  102. GLOBAL Handle            gAppMenuBar;
  103. GLOBAL AppPtr            gAppPtr;
  104.  
  105. // aplication specific globals
  106. GLOBAL ModalFilterUPP            gWindowEventFilterUPP;
  107. GLOBAL ModalFilterYDUPP            gWindowEventFilterYDUPP;
  108. GLOBAL GrowZoneUPP                gGrowZoneUPP;
  109. GLOBAL ControlActionUPP            gScrollBarActionUPP;
  110. GLOBAL DragReceiveHandlerUPP    gDragReceiveHandlerUPP;
  111. GLOBAL DragTrackingHandlerUPP    gDragTrackingHandlerUPP;
  112. GLOBAL DragSendDataUPP            gDragSendProcUPP;
  113.  
  114. #ifdef USE_CALIB
  115. GLOBAL DlgHookYDUPP                gDlgHookYDUPP;
  116. GLOBAL Boolean                    gCALibExists;
  117. GLOBAL Boolean                    gAppInForeGround;
  118. GLOBAL CADocumentRef            gFocusDocument;
  119. #endif
  120.  
  121. GLOBAL short            gCurrentTool;        // the current tool we are using.
  122. GLOBAL Handle            gSplatsnd;            // handle to sound for flipping pages.
  123.  
  124. GLOBAL PicHandle        gItemPICT[4];        // pictures
  125.  
  126.  
  127. #endif
  128.